In this video, you'll
be looking at control security and sharing
model-driven apps. Microsoft Power Apps use
role-based security for sharing. But first, let's look
at security roles. A security role includes
privileges that tells you the specific set of actions that users are allowed to
perform in the app. Remember, all app users
must be assigned to one or more predefined or
custom security roles. You'll be very happy to
know that roles can be assigned to individual
users or to teams. When you assign a role
to a user or a team, that user or all
members of the team are granted the same privileges
associated with the role. To share an app, you must have the environment admin
or system admin role. Let's look at creating or
setting up a security role. The Power Apps
environment includes predefined security
roles that show the tasks that users
are allowed to perform. Did you know that
security best practices will only allow users access to the minimum amount of business data that is
required to use the app? Let's look at this in
a bit more detail. Apps can be based
on a custom table. For this reason, the
user privileges need to be very specific before
anyone can work on it. To do this, you can use either of the
following approaches. The first option is to expand
predefined security roles, which will include
privileges for rows that are in the custom table or create a custom security role to manage the privileges for
the users of the app. Let's see why security
roles are important. Security roles control a
user's access to data, that is setup in access
levels and permissions. The combination of access levels and permissions that
are included in a specific security
role sets limits on the user's view of data and the interactions
with that data. Think about security roles
as keys for a house. Different keys allow you
access to different rooms. The apps that users can use depend on security roles
they're assigned to. You cannot enter a
room without a key. The following predefined roles are available with the
Power Apps environment. First, you will learn about the role of an
environment maker, then you'll get to look the
system administrator role. Next, the system customizer
role will be unpacked. You'll also learn more
about the role of a Microsoft Dataverse user, and finally, the role of a
delegate will be explored. It's important to remember
that unless otherwise noted, all the privileges of these
roles have global scope. Now let's look at how to
share a link to your app. Sharing a model-driven app
involves two primary steps. The first step is to associate one or more security
roles with the app, then assign a security
role to users. Let's see what steps you
need to do to follow this. On the Power Apps homepage, navigate to apps in
the navigation menu. From the list of apps, locate the model-driven app that
you created earlier, and click "More Commands". Select "Share" from
the drop-down menu to open the share app screen. Here you can add people and assign security
roles for your app. First, select your app from
the app list on the left. You can then configure the security roles that
your app will use. The security roles are managed within
Microsoft Dataverse. Click the drop-down
field to open a menu of custom security roles. Select the security
role to assign, and then click "Share." Great. Now search for and select the user you
wish to share the app with. Select a role for that user from the drop-down menu and
then click "Share". You can also share the link to your app by doing the following, first, return to your list of apps and locate your
model-driven app. Click "More Commands" and then select "Edit"
from the menu. Finally, in app designer, go to the Properties tab. Simply locate and copy the URL. As you can see,
sharing a link to your app involves a
few simple steps. With enough practice, you'll be sharing links to
your app in no time. Excellent job in completing
this lesson. See you soon.